import tables, strutils
type
  Plant* = enum
    Violets, Grass, Radishes, Clover

const
  PlantSymbol = toTable {
    'V': Violets,
    'G': Grass,
    'R': Radishes,
    'C': Clover,
  }
proc plants*(garden, name: string): seq[Plant] = 
  let child = (name[0].ord - 'A'.ord) * 2
  for row in garden.splitLines:
    result.add PlantSymbol[row[child]]
    result.add PlantSymbol[row[child.succ]]